The present disclosure relates to the technical field of wireless door lock, and particularly to a method of achieving free-pairing wireless door lock based on DIP (Double In-line Package) switch, a wireless door lock and a communication method for the wireless door lock.
Wireless door lock is a lock that can be remotely controlled via wireless communication. A wireless door lock is generally capable of networking. A networking system includes multiple wireless door locks and wireless communication concentrators. Control information or instructions can be sent via the wireless concentrators to each of the wireless door locks, so as to remotely control the wireless door locks to have a door locked, unlocked or otherwise.
However, during wireless transmission, a receiver can only identify a request from one transmitter at one time. If there are multiple transmitters transmitting data at the same time, it may cause the receiver to malfunction due to data conflict. To ensure a reliable data transmission, it is required to establish a conflict avoidance mechanism for wireless communication transmission. A simple way to do this is to establish a unique address mapping table between transmitters and receivers. To be specific, the transmitters are allocated with different addresses, and the receivers distinguish different transmitters according to the addresses carried by the data transmitted by the transmitters. For example, it is required to establish an address mapping table between traditional wireless door locks and wireless concentrators in advance. The address mapping relational table records the address mapping relationships between the wireless door lock and the wireless concentrator required to communicate with such wireless door lock. In subsequent communications, multiple wireless door locks transmit data carrying addresses thereof to the corresponding wireless communication concentrators according to the address mapping table at a slot time, and the wireless communication concentrators can distinguish the source transmitter of each piece of data.
To overcome at least one defect existing in the prior art, it is a purpose of the present disclosure to propose a method of achieving free-pairing wireless door lock based on DIP switch which is intended to separate the software and hardware work at the implementation site, to ensure that the construction and subsequent maintenance will not be interrupted because of software pairing method or operation sequence, and thus to reduce the implementation cost and improve the implementation efficiency.
In a first aspect, the embodiments of the present disclosure provide a method of achieving free-pairing wireless door lock based on DIP switch which specifically includes the following steps.
Step 1, selecting for a wireless door lock a wireless chip that supports data modulation, in which case a data field of a transmission packet includes a lock address bit field and an area code field;
Step 2, providing a built-in multi-bit DIP switch for the wireless door lock in terms of hardware, in which case the multi-bit DIP switch is directly connected with an input pin of a central processing unit of the wireless door lock;
Step 3, installing an embedded software in the central processing unit of the wireless door lock;
Step 4, matching a DIP switch addresses with a room number during installation of the wireless door lock; and
Step 5, reading, during powering up of the wireless door lock, a unique address code and a concentrator area code field that are set in advance, and sending to the wireless door lock reply data indicative of successful mapping, so that the wireless door lock shows through interaction that code matching is successful, in which case meaning the code matching is successful at end of the powering up of the wireless door lock.
In a second aspect, the embodiments of the present disclosure provide a wireless door lock. The wireless door lock includes a central processing unit, a multi-bit DIP switch and a wireless chip.
A plurality of pins of the multi-bit DIP switch are connected with a plurality of input pins of the central processing unit, respectively. The multi-bit DIP switch is configured to send, after being powered up, a current DIP switch address of the multi-bit DIP switch to the central processing unit.
The central processing unit is connected with the wireless chip. The central processing unit is configured to use, as a communication address, the DIP switch address acquired from the multi-bit DIP switch, and send, using the communication address via the wireless chip, a request for establishing communication to the wireless concentrator, so as to establish wireless communication with the wireless concentrator.
In a third aspect, the embodiments of the present disclosure provide a communicating method for a wireless door lock, applicable to a wireless door lock. The wireless door lock includes a central processing unit, a multi-bit DIP switch and a wireless chip. A plurality of pins of the multi-bit DIP switch are connected with a plurality of input pins of the central processing unit, respectively. The central processing unit is connected with the wireless chip. The method includes steps of:    the multi-bit DIP switch sending a current DIP switch address of the multi-bit DIP switch to the central processing unit, after being powered up; and    the central processing unit using, as a communication address, the DIP switch address acquired from the multi-bit DIP switch, and sending, by using the communication address via the wireless chip, a request for establishing communication to the wireless concentrator, so as to establish wire communication with the wireless concentrator.